/*
 * Principal.java
 *
 * Created on 29 de marzo de 2009, 19:08
 */

package finaltsb.GUI;

import java.io.*;
import javax.swing.*;


/**
 * Gente la idea con esos 2 Label que clavé es como darle una bienvenida...
 * Surgio un problema que no se porque cdo compilo la clase veo el frame solo 
 * vacio sin nada!! --no me acuerdo..pero seguro es alguna propiedad q estoy poniendo mal
 * se fijan?...
 * Ah otra ficha q me callo es si tengo q poner un panel adentro del frame o no 
 * hacia falta..acá no lo puse..en las demás ventanas seguramente lo voy a usar :P
 * Hace años q no hago esto!! jajaja  es como aprender de cero
 * AH y espero q donde puse el paquete este bien :P si no esas cosas se pueden 
 * cambiar :P
 * 
 * @author  ANA
 */
public class Principal extends javax.swing.JFrame {
    
    /** Creates new form Principal */
    public Principal() {
        initComponents();
         try {
            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jlbBienvenida = new javax.swing.JLabel();
        jlbContenedorImagen = new javax.swing.JLabel();
        jmBarraMenu = new javax.swing.JMenuBar();
        jmMenu = new javax.swing.JMenu();
        jmiAgregar = new javax.swing.JMenuItem();
        jmiBuscar = new javax.swing.JMenuItem();
        jmiEliminar = new javax.swing.JMenuItem();
        jmiMostrar = new javax.swing.JMenuItem();
        jmiCargaMasiva = new javax.swing.JMenuItem();
        jmiSalir = new javax.swing.JMenuItem();
        jmAbout = new javax.swing.JMenu();
        jmAyuda = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(finaltsb.FinalTSBApp.class).getContext().getResourceMap(Principal.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N
        setResizable(false);

        jPanel1.setName("jPanel1"); // NOI18N

        jlbBienvenida.setText(resourceMap.getString("jlbBienvenida.text")); // NOI18N
        jlbBienvenida.setName("jlbBienvenida"); // NOI18N

        jlbContenedorImagen.setIcon(resourceMap.getIcon("jlbContenedorImagen.icon")); // NOI18N
        jlbContenedorImagen.setText(resourceMap.getString("jlbContenedorImagen.text")); // NOI18N
        jlbContenedorImagen.setName("jlbContenedorImagen"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(76, 76, 76)
                        .addComponent(jlbContenedorImagen))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(113, 113, 113)
                        .addComponent(jlbBienvenida, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(75, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(45, 45, 45)
                .addComponent(jlbBienvenida, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jlbContenedorImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(36, Short.MAX_VALUE))
        );

        jmBarraMenu.setName("jmBarraMenu"); // NOI18N

        jmMenu.setText(resourceMap.getString("jmMenu.text")); // NOI18N
        jmMenu.setName("jmMenu"); // NOI18N

        jmiAgregar.setText(resourceMap.getString("jmiAgregar.text")); // NOI18N
        jmiAgregar.setName("jmiAgregar"); // NOI18N
        jmiAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiAgregarActionPerformed(evt);
            }
        });
        jmMenu.add(jmiAgregar);

        jmiBuscar.setText(resourceMap.getString("jmiBuscar.text")); // NOI18N
        jmiBuscar.setName("jmiBuscar"); // NOI18N
        jmiBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiBuscarActionPerformed(evt);
            }
        });
        jmMenu.add(jmiBuscar);

        jmiEliminar.setText(resourceMap.getString("jmiEliminar.text")); // NOI18N
        jmiEliminar.setName("jmiEliminar"); // NOI18N
        jmiEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiEliminarActionPerformed(evt);
            }
        });
        jmMenu.add(jmiEliminar);

        jmiMostrar.setText(resourceMap.getString("jmiMostrar.text")); // NOI18N
        jmiMostrar.setName("jmiMostrar"); // NOI18N
        jmiMostrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiMostrarActionPerformed(evt);
            }
        });
        jmMenu.add(jmiMostrar);

        jmiCargaMasiva.setText(resourceMap.getString("jmiCargaMasiva.text")); // NOI18N
        jmiCargaMasiva.setName("jmiCargaMasiva"); // NOI18N
        jmMenu.add(jmiCargaMasiva);

        jmiSalir.setText(resourceMap.getString("jmiSalir.text")); // NOI18N
        jmiSalir.setName("jmiSalir"); // NOI18N
        jmiSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiSalirActionPerformed(evt);
            }
        });
        jmMenu.add(jmiSalir);

        jmBarraMenu.add(jmMenu);

        jmAbout.setText(resourceMap.getString("jmAbout.text")); // NOI18N
        jmAbout.setName("jmAbout"); // NOI18N
        jmBarraMenu.add(jmAbout);

        jmAyuda.setText(resourceMap.getString("jmAyuda.text")); // NOI18N
        jmAyuda.setName("jmAyuda"); // NOI18N
        jmAyuda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmAyudaActionPerformed(evt);
            }
        });
        jmBarraMenu.add(jmAyuda);

        setJMenuBar(jmBarraMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        getAccessibleContext().setAccessibleParent(jmAyuda);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jmiSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiSalirActionPerformed
         System.exit(0);     
    }//GEN-LAST:event_jmiSalirActionPerformed

    private void jmiAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiAgregarActionPerformed
        new Agregar().setVisible(true);
        // TODO add your handling code here:
    }//GEN-LAST:event_jmiAgregarActionPerformed

    private void jmiBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiBuscarActionPerformed
        new Buscar().setVisible(true);       // TODO add your handling code here:
    }//GEN-LAST:event_jmiBuscarActionPerformed

    private void jmiEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiEliminarActionPerformed
         new Eliminar().setVisible(true);         // TODO add your handling code here:
    }//GEN-LAST:event_jmiEliminarActionPerformed

    private void jmiMostrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiMostrarActionPerformed
          new Mostrar().setVisible(true); 
        // TODO add your handling code here:
    }//GEN-LAST:event_jmiMostrarActionPerformed

    private void jmAyudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmAyudaActionPerformed
         new Ayuda().setVisible(true); 
        // TODO add your handling code here:
    }//GEN-LAST:event_jmAyudaActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel jlbBienvenida;
    private javax.swing.JLabel jlbContenedorImagen;
    private javax.swing.JMenu jmAbout;
    private javax.swing.JMenu jmAyuda;
    private javax.swing.JMenuBar jmBarraMenu;
    private javax.swing.JMenu jmMenu;
    private javax.swing.JMenuItem jmiAgregar;
    private javax.swing.JMenuItem jmiBuscar;
    private javax.swing.JMenuItem jmiCargaMasiva;
    private javax.swing.JMenuItem jmiEliminar;
    private javax.swing.JMenuItem jmiMostrar;
    private javax.swing.JMenuItem jmiSalir;
    // End of variables declaration//GEN-END:variables
    
}
